package ipt.pru.F3;





import ipt.pru.F3.AlumnoF3;

import java.util.Random;

/**
 * Clase para generar un numero aleatorio de 0 a 16
 * @author ur00 
 * @version 1.0
 */
public class Dado {
	  
	 
	private static final int NUMERO_ALUMNOS=16;
	
	/**
	 * Metodo retorna un numero de 0 a 16
	 *  @return int de 0 a 16 
	 *  Dado cambiado
	 */
	public static int respondeAlumno(){
		Random randomGenerator = new Random();
	    return randomGenerator.nextInt(NUMERO_ALUMNOS);
	    
	}
	
	public static final void main(String... aArgs){	   
	  
		AlumnoF3[] alumnos=AlumnoF3.inicializarAlumnos();
		int indice=respondeAlumno();
		AlumnoF3 a=(AlumnoF3)alumnos[indice];
	    System.out.println("Responde el alumno: "+indice+"  "+ a.getNombre()+" "+a.getApellido1()+" "+a.getApellido2()+"\n");
	    
	    for (int i=0;i<17;i++){
	    	if (i==0){
	    		if(i==indice)System.out.println("            [X]\n");
	    		else System.out.println("            [ ]\n");
	    	} else if (i%4==0){
	    		if(i==indice)System.out.println(" [X] ");
	    		else System.out.println(" [ ] ");
	    	} else if (i%4!=0){
	    		if (i%4==1){
	    			System.out.print("F"+((i/4)+1)+"  ");
	    		}
	    		if(i==indice)System.out.print(" [X] ");
	    		else System.out.print(" [ ] ");
	    	}
	    		
	    }
	    
	    
	  }

}
